<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>


<!-- Mirrored from www.zi-han.net/theme/hplus/projects.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:19:44 GMT -->
<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title>导航管理</title>
    <meta name="keywords" content="H+后台主题,后台bootstrap框架,会员中心主题,后台HTML,响应式后台">
    <meta name="description" content="H+是一个完全响应式，基于Bootstrap3最新版本开发的扁平化主题，她采用了主流的左右两栏式布局，使用了Html5+CSS3等现代技术">

    <link rel="shortcut icon" href="favicon.ico"> <link href="/furniture/Public/Admin/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
    <link href="/furniture/Public/Admin/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
    <link href="/furniture/Public/Admin/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
    <link href="/furniture/Public/Admin/css/animate.min.css" rel="stylesheet">
    <link href="/furniture/Public/Admin/css/css.css" rel="stylesheet">
    <link href="/furniture/Public/Admin/css/style.min862f.css?v=4.1.0" rel="stylesheet">
    <style>
      th{
        text-align: center;
      }
      td img{
        width: 40px;
        height: 40px;
      }
      .check{
        cursor: pointer;
      }
      .page_name input{
        width: 200px;
        height: 28px;
        line-height: 28px;
        border: none;
        outline: none;
        background: rgba(255,255,255,0);
        text-align: center;
      }
      .art_on input{
        border:1px solid #666;
        outline: skyblue;
        background: rgba(255,255,255,0);
      }
    </style>

</head>

<body class="gray-bg">

    <div class="wrapper wrapper-content animated fadeInUp">
        <div class="row">
            <div class="col-sm-12">

                <div class="ibox">
                    <div class="ibox-title">
                        <h5>所有单页</h5>
                        <div class="ibox-tools">
                            <a href="<?php echo U('Admin/page/page_add');?>" class="btn btn-primary btn-xs">添加单页</a>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <div class="row m-b-sm m-t-sm">
                            <div class="col-md-1">
                                <button type="button" id="loading-example-btn" class="btn btn-white btn-sm"><i class="fa fa-refresh"></i> 刷新</button>
                            </div>

                            <div class="col-md-11">
                              <form action="" method="get">
                                <div class="input-group">
                                  
                                      <input type="text" placeholder="" class="input-sm form-control" name="page_name" id="page_name"> <span class="input-group-btn">
                                      <div type="submit" class="btn btn-sm btn-primary" name="sou" value="1" id="search"> 搜索</div> </span>
                                  
                                </div>
                                </form>
                            </div>
                        </div>

                        <div class="project-list">
                            <table class="table table-hover" style="text-align:center">
                                <tbody>
                                  
                                </tbody>
                            </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    <script src="/furniture/Public/Admin/js/jquery.min.js?v=2.1.4"></script>
    <script src="/furniture/Public/Admin/js/bootstrap.min.js?v=3.3.6"></script>
    <script src="/furniture/Public/Admin/js/content.min.js?v=1.0.0"></script>
    <script src="/furniture/Public/Admin/js/plugins/sweetalert/sweetalert.min.js"></script>
    <script>
      $("#checkall").click(function(){
        if($(this).prop("checked")){
          $(".cbox").prop("checked", true);
        }else{
          $(".cbox").prop("checked", false);
        }
    
      });
      $(document).on('click','.del',function(){
            //获取属性a_id的值
              var a_id=$(this).attr('a_id');
              swal({
                  title: "您确定要删除这条信息吗",
                  text: "删除后将无法恢复，请谨慎操作！",
                  type: "warning",
                  showCancelButton: true,
                  confirmButtonColor: "#1647a1",
                  confirmButtonText: "确定",
                  cancelButtonText: "取消",
                  closeOnConfirm: false,
                  closeOnCancel: true
              }, function(isConfirm) {
                  if (isConfirm) {
                    $.ajax({
                      type:'get',
                      url:"<?php echo U('Admin/page/page_del');?>",
                      data:'a_id='+a_id,
                      dataType:'text',
                      success:function(z){
                        console.log(z);
                        if(z==1){
                          swal("删除成功！", "您已经永久删除了这条信息。", "success")
                          function aa(){
                            $('#loading-example-btn').click();
                          }
                          setTimeout(aa,1500);
                        }else{
                          swal("数据执行有误", "请联系客服", "error")
                        }
                      }
                    })
                      swal("删除成功！", "您已经永久删除了这条信息。", "success")
                  } else {
                      swal("已取消", "您取消了删除操作！", "error")
                  }
              })
      });
          $('.dels').click(function(){
            
          })
       $(document).ready(function(){$("#loading-example-btn").click(function(){btn=$(this);simpleLoad(btn,true);simpleLoad(btn,false)})});function simpleLoad(btn,state){if(state){btn.children().addClass("fa-spin");btn.contents().last().replaceWith(" Loading")}else{setTimeout(function(){btn.children().removeClass("fa-spin");btn.contents().last().replaceWith(" Refresh")},2000)}};
       $('#loading-example-btn').click(function(){
        location.reload();
       })

       $(document).on('dblclick','.page_name',function(){
       // $('.page_name').dblclick(function() {
            $(this).addClass('art_on');
            $(this).find('input').removeAttr('readonly');
        })
       $(document).on('blur','.page_name input',function(){
        // $('.page_name input').blur(function(){
          $(this).parent('.page_name').removeClass('art_on');
          $(this).attr('readonly','readonly');
          var value=$(this).val();
          var id=$(this).attr('data_id');
          $.ajax({
            type:'get',
            url:"<?php echo U('Admin/page/name_ajax');?>",
            data:'id='+id+'&value='+value,
            dataType:'text',
            success:function(z){
              console.log(z);
            }
          })
        })
    </script>

    <script>
      $(document).on('click','#search',function(){
            var value=$('#page_name').val();
            $.ajax({
                type:'get',
                url:"<?php echo U('Admin/Page/page_ajax');?>",
                data:'sou='+value,
                dataType:'html',
                success:function(z){
                    //console.log(z);
                    $('.table tbody').html(z);
                }
            })
        })
      $.ajax({
        type:'get',
        url:"<?php echo U('Admin/Page/page_ajax');?>",
        data:'value=0',
        dataType:'html',
        success:function(z){
          //console.log(z);
          $('.table tbody').html(z);
        }
      })
      // 分页
      $(document).on('click','.digg a',function(){
        var href=$(this).attr('href');//拿到当前href属性的值
        $.ajax({
          type:'get',
          url:href,
          data:'',
          dataType:'html',
          success:function(z){
            //console.log(z);
            $('.table tbody').html(z);
          }
        })
        return false;//组织a链接跳转页面
      })
      var b=true;
      $(document).on('click','#click',function(){
        var ord;
        if(b){
          ord=1;//倒序
          b=false;
        }else{
          ord=2;//正序
          b=true;
        }
        //console.log(ord);
        $.ajax({
          type:'get',
          url:"<?php echo U('Admin/Product/product_ajax');?>",
          data:'value=0&ord='+ord,
          dataType:'html',
          success:function(z){
            //console.log(z);
            $('.table tbody').html(z);
          }
        })
      })  
    </script>
    </script>
    </body>

<!-- Mirrored from www.zi-han.net/theme/hplus/projects.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:19:44 GMT -->
</html>